3.232 \(\int \log ^2(c (b x^n)^p) \, dx\)

Optimal. Leaf size=39 \[ x \log ^2\left (c \left (b x^n\right )^p\right )-2 n p x \log \left (c \left (b x^n\right )^p\right )+2 n^2 p^2 x \]

[Out]

2*n^2*p^2*x - 2*n*p*x*Log[c*(b*x^n)^p] + x*Log[c*(b*x^n)^p]^2

________________________________________________________________________________________

Rubi [A]  time = 0.0220322, antiderivative size = 39, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {2296, 2295, 2445} \[ x \log ^2\left (c \left (b x^n\right )^p\right )-2 n p x \log \left (c \left (b x^n\right )^p\right )+2 n^2 p^2 x \]

Antiderivative was successfully verified.

[In]

Int[Log[c*(b*x^n)^p]^2,x]

[Out]

2*n^2*p^2*x - 2*n*p*x*Log[c*(b*x^n)^p] + x*Log[c*(b*x^n)^p]^2

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2445

Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_.)*(u_.), x_Symbol] :> Subst[Int[u*(
a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e,
f, m, n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[IntHide[u*(a + b*Log[c*d^n*(e
+ f*x)^(m*n)])^p, x]]

Rubi steps

\begin{align*} \int \log ^2\left (c \left (b x^n\right )^p\right ) \, dx &=\operatorname{Subst}\left (\int \log ^2\left (b^p c x^{n p}\right ) \, dx,b^p c x^{n p},c \left (b x^n\right )^p\right )\\ &=x \log ^2\left (c \left (b x^n\right )^p\right )-\operatorname{Subst}\left ((2 n p) \int \log \left (b^p c x^{n p}\right ) \, dx,b^p c x^{n p},c \left (b x^n\right )^p\right )\\ &=2 n^2 p^2 x-2 n p x \log \left (c \left (b x^n\right )^p\right )+x \log ^2\left (c \left (b x^n\right )^p\right )\\ \end{align*}

Mathematica [A]  time = 0.0026566, size = 37, normalized size = 0.95 \[ x \log ^2\left (c \left (b x^n\right )^p\right )-2 n p \left (x \log \left (c \left (b x^n\right )^p\right )-n p x\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Log[c*(b*x^n)^p]^2,x]

[Out]

x*Log[c*(b*x^n)^p]^2 - 2*n*p*(-(n*p*x) + x*Log[c*(b*x^n)^p])

________________________________________________________________________________________

Maple [F]  time = 0.027, size = 0, normalized size = 0. \begin{align*} \int \left ( \ln \left ( c \left ( b{x}^{n} \right ) ^{p} \right ) \right ) ^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*(b*x^n)^p)^2,x)

[Out]

int(ln(c*(b*x^n)^p)^2,x)

________________________________________________________________________________________

Maxima [A]  time = 1.2046, size = 53, normalized size = 1.36 \begin{align*} 2 \, n^{2} p^{2} x - 2 \, n p x \log \left (\left (b x^{n}\right )^{p} c\right ) + x \log \left (\left (b x^{n}\right )^{p} c\right )^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(b*x^n)^p)^2,x, algorithm="maxima")

[Out]

2*n^2*p^2*x - 2*n*p*x*log((b*x^n)^p*c) + x*log((b*x^n)^p*c)^2

________________________________________________________________________________________

Fricas [B]  time = 0.926268, size = 230, normalized size = 5.9 \begin{align*} n^{2} p^{2} x \log \left (x\right )^{2} + 2 \, n^{2} p^{2} x - 2 \, n p^{2} x \log \left (b\right ) + p^{2} x \log \left (b\right )^{2} + x \log \left (c\right )^{2} - 2 \,{\left (n p x - p x \log \left (b\right )\right )} \log \left (c\right ) - 2 \,{\left (n^{2} p^{2} x - n p^{2} x \log \left (b\right ) - n p x \log \left (c\right )\right )} \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(b*x^n)^p)^2,x, algorithm="fricas")

[Out]

n^2*p^2*x*log(x)^2 + 2*n^2*p^2*x - 2*n*p^2*x*log(b) + p^2*x*log(b)^2 + x*log(c)^2 - 2*(n*p*x - p*x*log(b))*log
(c) - 2*(n^2*p^2*x - n*p^2*x*log(b) - n*p*x*log(c))*log(x)

________________________________________________________________________________________

Sympy [B]  time = 1.17567, size = 116, normalized size = 2.97 \begin{align*} n^{2} p^{2} x \log{\left (x \right )}^{2} - 2 n^{2} p^{2} x \log{\left (x \right )} + 2 n^{2} p^{2} x + 2 n p^{2} x \log{\left (b \right )} \log{\left (x \right )} - 2 n p^{2} x \log{\left (b \right )} + 2 n p x \log{\left (c \right )} \log{\left (x \right )} - 2 n p x \log{\left (c \right )} + p^{2} x \log{\left (b \right )}^{2} + 2 p x \log{\left (b \right )} \log{\left (c \right )} + x \log{\left (c \right )}^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(c*(b*x**n)**p)**2,x)

[Out]

n**2*p**2*x*log(x)**2 - 2*n**2*p**2*x*log(x) + 2*n**2*p**2*x + 2*n*p**2*x*log(b)*log(x) - 2*n*p**2*x*log(b) +
2*n*p*x*log(c)*log(x) - 2*n*p*x*log(c) + p**2*x*log(b)**2 + 2*p*x*log(b)*log(c) + x*log(c)**2

________________________________________________________________________________________

Giac [B]  time = 1.3223, size = 124, normalized size = 3.18 \begin{align*} n^{2} p^{2} x \log \left (x\right )^{2} - 2 \, n^{2} p^{2} x \log \left (x\right ) + 2 \, n p^{2} x \log \left (b\right ) \log \left (x\right ) + 2 \, n^{2} p^{2} x - 2 \, n p^{2} x \log \left (b\right ) + p^{2} x \log \left (b\right )^{2} + 2 \, n p x \log \left (c\right ) \log \left (x\right ) - 2 \, n p x \log \left (c\right ) + 2 \, p x \log \left (b\right ) \log \left (c\right ) + x \log \left (c\right )^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(b*x^n)^p)^2,x, algorithm="giac")

[Out]

n^2*p^2*x*log(x)^2 - 2*n^2*p^2*x*log(x) + 2*n*p^2*x*log(b)*log(x) + 2*n^2*p^2*x - 2*n*p^2*x*log(b) + p^2*x*log
(b)^2 + 2*n*p*x*log(c)*log(x) - 2*n*p*x*log(c) + 2*p*x*log(b)*log(c) + x*log(c)^2